//
//  EventView.m
//  WIFI
//
//  Created by macbook on 2022/5/16.
//

#import "EventView.h"

@implementation EventView

- (UIView *)hitTest:(CGPoint)point withEvent:(UIEvent *)event {
    
    if (!self.isUserInteractionEnabled || self.hidden || self.alpha == 0) {
        return nil;
    }
    for (UIView *subView in [self.subviews reverseObjectEnumerator] ) {
        CGPoint convertedPoint = [subView convertPoint:point fromView:self];
        UIView *hitView = [subView hitTest:convertedPoint withEvent:event];
        if (hitView) {
            return hitView;
        }
    }
    return self;
}

@end
